﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MySql;
using MySql.Data.MySqlClient;

namespace TemplatetoSQL
{
    public partial class sqlconn : Form
    {
        public sqlconn()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            string uname = username.Text;
            string pwd = password.Text;
            string host = sqladdress.Text;
            string db = dbname.Text;
            string strcon = "User Id=" + uname + ";PassWord=" + pwd + ";Host=" + host + ";Database=" + db + ";";

            Form1 f1 = new Form1();
            f1.showdata(strcon, db);
            this.Hide();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            sqlconn sqlconn = new sqlconn();
            sqlconn.Close();
        }
    }
}
